import Vue from "vue";
import VueRouter from "vue-router";
import manage from '../components/dh_xgj_manage.vue'
import details from '../components/dh_xgj_details.vue'

import inform from '../components/dh_xgj_inform.vue'

import client from '../components/dh_xgj_detclient.vue'
import clidet from '../components/dh_xgj_clientdetails.vue'

// 挂在路由，因为这个是vue的核心专用组件，实用的install方法调用，必须用Vue.use挂载
Vue.use(VueRouter);

// 路由注册
const routes = [
    {
        path: '/',
        name: 'manage',
        component: manage
    },{
        path: '/details',
        name: 'details',
        component: details,
    },{
        path: '/inform',
        name: 'inform',
        component: inform
    },
    { 
        path: "/client/:id",
        name: "client",
        component: client 
    },
    { 
        path: "/clidet/:clientid",
        name: "clidet",
        component: clidet  
    }
]


const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router